package day07.ThreadDemo;

/*
 * Author: JacksonCoder
 * FileName: ReentrantLockDemo
 * Version: 1.0.0
 * Date: 2025/4/14
 */

import java.util.concurrent.locks.ReentrantLock;

public class ReentrantLockDemo {

    private final ReentrantLock lock = new ReentrantLock();

    public void doWork(){
        lock.lock();
        try{
            System.out.println("Working with lock");
        }catch(Exception e){
            e.printStackTrace();
        }
    }
    public static void main(String[] args) {
    }

}
